<?php

namespace app\log\controller;

use think\admin\Controller;

use app\log\model\SmsModel;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;

class Sms extends Controller
{
    /**
     * 当前操作数据库
     * @var string
     */
    private string $table = 'Sms';

    /**
     * 短信日志
     * @auth true
     * @menu true
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function index()
    {
        $this->title = '短信日志';

        $query = $this->_query(SmsModel::class);
        $query->equal('type')
            ->like('receive')
            ->order('id', 'DESC')
            ->page(true, true);
    }

}